/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.sun.hunk.struts.action;

import com.sun.hunk.cache.JSPContainer;
import com.sun.hunk.struts.HunkDispatchAction;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

/**
 *
 * @author sunil
 */
public class CacheAction extends HunkDispatchAction {

    public ActionForward clearCache(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
        JSPContainer.clearCache();
        setMessage(request, "Cache is cleared successfully !");
        return mapping.findForward("home");
    }
}
